package chipyard_learning.cakepattern

class Cat{
  def myname = println("I am a happy cat!")
}

trait HasLeg{
  def run = println("Now, I can run here and there.")
}

trait HasMouth{
  def miao = println("Miao, Miao, Miao~")
}

object traittest extends App{
  var cat = new Cat
  cat.myname
  var cat1 = new Cat with HasLeg
  cat1.run
  var cat2 = new Cat with HasLeg with HasMouth
  cat2.miao
}
